﻿
using B.S.DataBase.MyProject.ErrorCode;
using MediatR;
using System.ComponentModel.DataAnnotations;

namespace D.Traceability.Write.API.APPlicant.Command
{
    /// <summary>
    /// 修改溯源单个对象(通过 -- 生产批次查询)
    /// </summary>
    public class UpdateTraceCommand :  IRequest<APIResult<string>>
    {
        /// <summary>
        /// 主键
        /// </summary>
        public int TraceaId { get; set; }
        /// <summary>
        /// 商品名称
        /// </summary>
        public string GoodsName { get; set; }

        /// <summary>
        /// 生产批次，设置为唯一
        /// </summary>
        //[Index(IsUnique = true)]
        public string TraceaBatch { get; set; }

        /// <summary>
        /// 保质期（天）
        /// </summary>
        public int TraceaQualityDay { get; set; }
        /// <summary>
        /// 生产许可证号
        /// </summary>
        public string TraceaLicenseCode { get; set; }
        /// <summary>
        /// 生产企业
        /// </summary>
        public string TraceaEnterpriseName { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string? TraceaUpdateName { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? TraceaUpdateTime { get; set; }
        /// <summary>
        /// 图片(封面图)
        /// </summary>
        public string? TraceaPicture { get; set; }
    }
}
